package com.dataseek.iot.product.sample;

public class TestStr {
    public static void main(String[] args) {
        String url="http://127.0.0.1:28688/sys/~tenanta~/user/login";
        int beginIndex = url.indexOf("~")+1;
        int endIndex = url.lastIndexOf("~");
        String tenantCode = url.substring(beginIndex,endIndex);
        System.out.println();
    }
}
